<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateBasicInfoLearnHistoryTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('basic_info_learn_history', function (Blueprint $table) {
            $table->bigInteger('id', true);
            $table->bigInteger('user_id')->nullable()->comment('userId数据');
            $table->bigInteger('data_version_id')->nullable()->comment('dataVersionId');
            $table->bigInteger('form_instance_id')->nullable()->comment('formInstanceId');
            $table->string('name', 255)->nullable()->comment('毕业学校');
            $table->string('certifier', 255)->nullable()->comment('证明人');
            $table->dateTime('begin_time')->nullable()->comment('开始日期');
            $table->dateTime('end_time')->nullable()->comment('结束日期');
            $table->integer('deleted')->nullable()->default(0)->comment('是否被删除');
            $table->dateTime('created_at')->nullable()->useCurrent();
            $table->dateTime('updated_at')->nullable()->useCurrent();
            $table->bigInteger('creator_id')->nullable();
            $table->bigInteger('updater_id')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('basic_info_learn_history');
    }
};
